{layout name="public/layout" /}
        {include file='yxnavbar'}
<div class="main">
    <ul class="nav nav-tabs">
        <li {if $action < 2}class="active"{/if}><a href="{php echo createWebUrl('shengshi');}">城市列表</a></li>
        <li {if $action == 2}class="active"{/if}><a href="{php echo createWebUrl('shengshi', array('action' =>2));}">抢定城市</a></li>
        <li {if $action == 3}class="active"{/if}><a href="{php echo createWebUrl('shengshi', array('action' =>3));}">内定城市</a></li>
    </ul>
</div>       
<style>
.table td span{display:inline-block;margin-top:4px;}
.table td input{margin-bottom:0;}
</style>
<form class="form-horizontal form" action="{php echo createWebUrl('shengshi', array('op' =>'save'));}" method="post" enctype="multipart/form-data">
<div class="clearfix">
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
  <div class="nav_tab nav_0">

    <div class="panel panel-default">
        <div class="panel-heading">{php echo $op == 'add'?'添加地区':'修改地区';}</div>
        <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">排序</label>
                    <div class="col-sm-8 col-xs-12">
                        <input type="text" class="form-control" placeholder="" name="displayorder"  value="{$item['displayorder']}">
                        <span class="help-block">数字越大，越靠前，默认全为0</span>

                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">上一级</label>
                    <div class="col-sm-8 col-xs-12">
                        <input type="text" class="form-control" readonly placeholder="" name="parentName"  value="{$parentName}">
                    </div>
                </div> 
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style="color: red;">*</span>地区名</label>
                    <div class="col-sm-8 col-xs-12">
                        <input type="text" class="form-control"  placeholder="" name="areaName"  value="{$item['areaName']}">
                       <span class="help-block">尽量用简称:客户核销界面,员工排行界面等处会有显示</span>
                    </div>
                </div> 
                 <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">城市级别</label>
                    <div class="col-sm-8 col-xs-12">
                        <select class="form-control" name="level">
                        {loop $level $index $row}
                            <option value="{$index}" {if $item['level'] == $index }selected="selected"{/if}>{$row}</option>
                        {/loop}
                         </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">邮编</label>
                    <div class="col-sm-8 col-xs-12">
                        <input type="text" class="form-control"  placeholder="" name="areaCode"  value="{$item['areaCode']}">
                    </div>
                </div> 
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">区号</label>
                    <div class="col-sm-8 col-xs-12">
                        <input type="text" class="form-control"  placeholder="" name="cityCode"  value="{$item['cityCode']}">
                    </div>
                </div> 
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">备注</label>
                    <div class="col-sm-8 col-xs-12">
                        <input type="text" class="form-control"  placeholder="" name="notes"  value="{$item['notes']}">
                    </div>
                </div> 

        </div>
  </div> 
    </div>
</div>

    <div class="form-group">
        <div class="col-sm-12">
            <input name="submit" type="submit" value="提交" class="btn btn-primary col-lg-1">
            <input type="hidden" name="__token__" value="{$Request.token}" />
            <input type="hidden" name="referer" value="{$referer}" />
            <input type="hidden" name="areaId" value="{$areaId}" />
            <input type="hidden" name="parentId" value="{$parentId}" />
        </div>
    </div>
</form>

